When a video of high quality is encoded, a large amount of data is required. However, since a bandwidth allowed for transmission of the video data is limited, a data rate applied to transmission of the video data may be limited. Therefore, for efficient transmission of video data, there is a need for video data encoding and decoding methods with minimal deterioration in image quality and increased compression rates.
Video data may be compressed by removing spatial redundancy and temporal redundancy between pixels. Since adjacent pixels generally have a common characteristic, encoding information of a data unit consisting of pixels is transmitted to remove redundancy between the adjacent pixels.
Pixel values of the pixels included in the data unit are not directly transmitted but information regarding a method of obtaining the pixel values is transmitted. A prediction method of predicting a pixel value that is similar to an original value is determined for each data unit, and encoding information regarding the prediction method is transmitted from an encoder to a decoder. Since a prediction value is not completely equal to the original value, residual data of a difference between the original value and the prediction value is transmitted from the encoder to the decoder.
When prediction is exact, a data amount of the encoding information for specifying the prediction method is increased but a size of the residual data is decreased. Therefore, the prediction method is determined by taking into account sizes of the encoding information and the residual data. In particular, a data unit that is split from a picture has various sizes, and in this regard, when a size of the data unit is increased, there is an increased probability that accuracy of prediction is decreased, whereas a data amount of encoding information is decreased. Thus, a size of a block is determined according to characteristics of a picture.
The prediction method includes intra prediction and inter prediction. The intra prediction involves predicting pixels of a block from adjacent pixels of the block. The inter prediction involves predicting pixels by referring to pixels of a different picture referred to by a picture including the block. Therefore, spatial redundancy is removed through the intra prediction, and temporal redundancy is removed through the inter prediction.
When the number of prediction methods is increased, an amount of encoding information for indicating the prediction method is increased. Thus, when the encoding information to be applied to a block is predicted from a different block, the amount of the encoding information may be decreased.
Since loss of video data is allowed to the extent that the human eye cannot recognize the loss, residual data may be lossy-compressed according to transformation and quantization processes, and by doing so, an amount of the residual data may be decreased.